package com.TwinBlade.PicturePassword;

import android.content.res.Resources;
import android.graphics.BlurMaskFilter;
import android.graphics.BlurMaskFilter.Blur;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.SystemClock;
import android.util.StateSet;
import android.view.animation.AnimationUtils;

class l extends Drawable
  implements Runnable
{
  private String a;
  private Drawable b;
  private Paint c;
  private Paint d;
  private float e;
  private boolean f;
  private float g;
  private int h;
  private k i;

  public l(Resources paramResources, String paramString, boolean paramBoolean)
  {
    this.a = paramString;
    this.b = paramResources.getDrawable(17301612);
    this.c = new Paint(j);
    this.c.setTypeface(Typeface.DEFAULT_BOLD);
    this.c.setTextSize(16.0F);
    this.c.setColor(-16777216);
    this.d = new Paint(this.c);
    this.d.setStyle(Paint.Style.STROKE);
    this.d.setStrokeWidth(3.0F);
    this.d.setColor(-1140866304);
    this.d.setMaskFilter(new BlurMaskFilter(1.0F, BlurMaskFilter.Blur.NORMAL));
    this.e = this.d.measureText(this.a);
    if (paramBoolean);
    while (true)
    {
      this.g = j;
      this.i = new k();
      return;
      j = 0;
    }
  }

  public void draw(Canvas paramCanvas)
  {
    int j = 255;
    this.b.draw(paramCanvas);
    if ((this.i.hasStarted()) && (!this.i.hasEnded()))
    {
      this.i.getTransformation(AnimationUtils.currentAnimationTimeMillis(), null);
      this.g = this.i.a();
    }
    Rect localRect = getBounds();
    float f1 = 6.0F + this.g * (localRect.width() - this.e - 6.0F - 6.0F);
    float f2 = (localRect.height() + this.c.getTextSize()) / 2.0F;
    Paint localPaint1 = this.d;
    int k;
    Paint localPaint2;
    if (this.f)
    {
      k = j;
      localPaint1.setAlpha(k);
      localPaint2 = this.c;
      if (!this.f)
        break label185;
    }
    while (true)
    {
      localPaint2.setAlpha(j);
      paramCanvas.drawText(this.a, f1, f2, this.d);
      paramCanvas.drawText(this.a, f1, f2, this.c);
      return;
      k = 127;
      break;
      label185: j = 127;
    }
  }

  public int getOpacity()
  {
    return -3;
  }

  public boolean isStateful()
  {
    return true;
  }

  protected void onBoundsChange(Rect paramRect)
  {
    this.b.setBounds(paramRect);
  }

  protected boolean onLevelChange(int paramInt)
  {
    if ((paramInt < 4000) && (this.h <= 0))
    {
      this.h = 1;
      this.i.a(this.g, 1.0F);
      scheduleSelf(this, 50L + SystemClock.uptimeMillis());
    }
    while (true)
    {
      return this.b.setLevel(paramInt);
      if ((paramInt > 6000) && (this.h >= 0))
      {
        this.h = -1;
        this.i.a(this.g, 0.0F);
        scheduleSelf(this, 50L + SystemClock.uptimeMillis());
      }
    }
  }

  protected boolean onStateChange(int[] paramArrayOfInt)
  {
    this.f = (StateSet.stateSetMatches(e.a, paramArrayOfInt) | StateSet.stateSetMatches(e.b, paramArrayOfInt));
    invalidateSelf();
    return false;
  }

  public void run()
  {
    this.i.getTransformation(AnimationUtils.currentAnimationTimeMillis(), null);
    this.g = this.i.a();
    if (!this.i.hasEnded())
      scheduleSelf(this, 50L + SystemClock.uptimeMillis());
    invalidateSelf();
  }

  public void setAlpha(int paramInt)
  {
  }

  public void setColorFilter(ColorFilter paramColorFilter)
  {
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.TwinBlade.PicturePassword.l
 * JD-Core Version:    0.6.2
 */